import request from '@/utils/request'

const review = {
  indexList(params){
    return request.get('/wcx/reviewIndex/list', {params});
  },
  indexGet(id){
    return request.get(`/wcx/reviewIndex/detail/${id}`);
  },
  indexUpdate(data){
    return request.post(`/wcx/reviewIndex/update`,data);
  },
  indexAdd(data){
    return request.post(`/wcx/reviewIndex/add`,data);
  },
  indexDel(id){
    return request.post(`/wcx/reviewIndex/delete/${id}`);
  },
  // 新增评审组
  teamAdd(data){
    return request.post(`/wcx/reviewTeam/add`,data);
  },
  // 修改评审组
  teamUpdate(data){
    return request.post(`/wcx/reviewTeam/update`,data);
  },
  // 删除评审组
  teamDel(id){
    return request.post(`/wcx/reviewTeam/delete/${id}`);
  },
  // 获取评审组
  teamGet(id){
    return request.get(`/wcx/reviewTeam/detail/${id}`);
  },
  teamList(params){
    return request.get('/wcx/reviewTeam/list', {params});
  },
  // 评审组树状列表
  teamTree(params){
    return request.get('/wcx/reviewTeam/tree', {params});
  },
  // 评审组绑定成果
  teamInnovationAdd(data){
    return request.post('/wcx/projectReviewTeam/add',data)
  },
  // 评审组绑定多个成果
  teamInnovationsAddList(data){
    return request.post('/wcx/projectReviewTeam/addList',data)
  },
  // 删除成果与评审组绑定关系
  teamInnovationDel(id){
    return request.post(`/wcx/projectReviewTeam/delete/${id}`);
  },
  // 根据评审组id获取该分组下所有成果
  teamInnovationGet(id){
    return request.get(`/wcx/projectReviewTeam/getByTeamId/${id}`);
  },
  // 查询成果列表
  teamInnovationList(params){
    return request.get('/wcx/innovations/waitReviewList',{params})
  },
  // 查询专家列表
  teamExpertList(params){
    return request.get('/wcx/expertsReviewTeam/expertsList',{params})
  },
  // 新增单个专家与评审组绑定
  teamExpertAdd(data){
    return request.post('/wcx/expertsReviewTeam/add',data)
  },
  // 新增多个专家与评审组绑定
  teamExpertAddList(data){
    return request.post('/wcx/expertsReviewTeam/addList',data)
  },
  // 删除专家与评审组绑定关系
  teamExpertDel(id){
    return request.post(`/wcx/expertsReviewTeam/delete/${id}`)
  },
  // 根据评审组id获取该分组下所有专家
  teamExpertGet(id){
    return request.get(`/wcx/expertsReviewTeam/getByTeamId/${id}`);
  },
  // 添加专家评审信息
  teamExpertsInfoUpdate(data){
    return request.post(`/wcx/projectExpertsInfo/update`, data);
  },
  // 组专家评审详情
  teamExpertsInfoGet(id){
    return request.get(`/wcx/projectExpertsInfo/detail/${id}`);
  },
  // 初始化成果与专家评审信息
  teamInfoInit(id){
    return request.post(`/wcx/projectExpertsInfo/init/${id}`);
  },
  // 根据项目id获取某个项目的所有专家评审信息
  teamInfoGetByInnovationId(id){
    return request.get(`/wcx/projectExpertsInfo/getByProjectId/${id}`);
  },
  //
  teamInnovationReviewUpdate(data){
    return request.post(`/wcx/projectReviewTeam/update`,data);
  },
  innovationReviewTeamGet(id){
    return request.get(`/wcx/projectReviewTeam/detail/${id}`);
  },
  otherExpertList(){
    return request.get(`/wcx/expertss/list`);
  },
  otherExpertExtract(){
    return request.post(`/wcx/expertss/extract`);
  },
  otherExpertExtractReset(){
    return request.get(`/wcx/expertss/reSet`);
  },
  // 随机分配成果
  extractByTeamId(teamId){
    return request.post(`/wcx/expertsReviewTeam/extractByTeamId/${teamId}`);
  },
  // 重置分配
  reSetByTeamId(teamId){
    return request.post(`/wcx/expertsReviewTeam/reSetByTeamId/${teamId}`);
  },
  zjSignPdf(data){
    return request.post(`/wcx/projectExpertsInfo/zjSignPdf`, data);
  },
  sendMsgByTeamIdAndTemplateId(id,templateId){
    return request.get(`/wcx/expertsReviewTeam/sendMsgByTeamIdAndTemplateId/${id}/${templateId}`);
  },
  sendMsgByIdAndTemplateId(id,templateId){
    return request.get(`/wcx/expertsReviewTeam/sendMsgByIdAndTemplateId/${id}/${templateId}`);
  },
  createMsgByIdAndTemplateId(id, templateId) {
    return request.get(`/wcx/expertsReviewTeam/createMsgByIdAndTemplateId/${id}/${templateId}`);
  },
  innovationList(params){
    return request.get('/wcx/projectReviewTeam/list', {params})
  },
}
export default review;
